package com.qcc.cashier;

import android.app.Application;

public class Ydk {
    private static Application application;
    private static boolean hasSetup = false;
    public static void setup(Application application, String ydkConfig) {
        Ydk.application = application;
        Ydk.hasSetup = true;
        YdkConfig.setup(ydkConfig);
//        RxActivityResult.register(application);

    }
    public static Application getApplicationContext() {
        if (!hasSetup) {
            throw new IllegalArgumentException("应用 没有调用 setup(Application application, String ydkConfig) 方法");
        }
        return application;
    }
    public static  boolean isSetup(){return  hasSetup;}
}
